package com.huangge1199.common.service.impl;

import com.huangge1199.common.entity.Account;
import com.huangge1199.common.dao.AccountDao;
import com.huangge1199.common.service.AccountService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 服务实现类
 *
 * @author huang
 * @since 2021-01-03
 */

@Service
public class AccountServiceImpl extends ServiceImpl<AccountDao, Account> implements AccountService {

    @Override
    public List<Account> list(Account model) {
        QueryWrapper<Account> wrapper = new QueryWrapper();
        return super.list(wrapper);
    }

    @Override
    public IPage<Account> pageList(Account model, Integer pageNum, Integer pageSize) {
        QueryWrapper<Account> wrapper = new QueryWrapper(model);
        return this.page(new Page<>(pageNum, pageSize), wrapper);
    }

}


